/**
 * Created by Dzl on 2017-2-16.
 */

'use strict';

var nodemailer = require('nodemailer');

var transporter = nodemailer.createTransport({
    service: 'QQ',
    auth: {
        user: '168189878@qq.com',
        pass: '授权码'
    }

});

var mailOptions = {
    from: '168189878@qq.com',
    to: 'hsqdzl@qq.com hsqdzl@126.com',
    subject: '你好，世界！',
    text: 'Hello world!',
    html: '<b> Hello world!</b>'
};

transporter.sendMail(mailOptions, function (err, info) {
    if (err) {
        return console.log(err);
    }
    console.log('Message %s sent: %s', info.messageId, info.response);
});

